package com.example.demo.entity;

import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

/**
 * 
* @ClassName: ApplicationEntity  
* @Description: TODO(流程申请表单)  
* @author Administrator  
* @date 2018年6月16日  
*
 */
@Table(name="application")
@Entity
@DynamicUpdate
public class ApplicationEntity implements java.io.Serializable {

	/**  
	* @Fields field:field:{todo}(用一句话描述这个变量表示什么)  
	*/ 
	private static final long serialVersionUID = 1L;

	/**ID*/
	@Id
	private String id;
	
	/**标题*/
	@Column(name="title")
	private String title;
	
	/**用户*/
	@ManyToOne(cascade=CascadeType.ALL,optional=true,targetEntity=SysUser.class)
	@JoinColumn(name = "user_id")
	private SysUser user;
	
	/**时间*/
	@Column(name="create_date")
	private Date date;
	
	/**状态*/
	@Column(name="status")
	private String status;
	
	public static final String UNAPPROVAL = "未通过";
	
	public static final String INAPPROVAL = "已通过";
	
	public static final String APPROVALING = "审核中";
	
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public SysUser getUser() {
		return user;
	}

	public void setUser(SysUser user) {
		this.user = user;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
